package cn.buk.qms.service;

import cn.buk.common.sc.CommonSearchCriteria;
import cn.buk.tms.entity.base.Airline;
import cn.buk.tms.entity.base.Airport;
import cn.buk.tms.entity.misc.FareCondition;
import cn.buk.common.JsonResult;
import cn.buk.tms.dto.AirlinesDto;
import cn.buk.tms.dto.AirportDto;
import cn.buk.tms.dto.CityDto;
import cn.buk.tms.dto.FlightCondTimeWindowDto;
import cn.buk.tms.flight.dto.LuggageInfoDto;

import java.util.List;

/**
 * Created by yfdai on 16/10/31.
 */
public interface BasicDataService {

    List<Airline> searchAirlineInfo(String twoCode);

    JsonResult saveAirlineInfo(int enterpriseId, Airline airline);

    List<FareCondition> searchFareCondition(int enterpriseId, String carrier, String subclass);

    List<Airport> searchAirports();

    List<Airport> searchAirportsByCountryCode(String countryCode);

    List<AirportDto> searchAirports(int enterpriseId, CommonSearchCriteria sc);

    Airport getAirportByCode(String threeCode);

    /**
     * 新建/更新机场信息
     *
     * @param enterpriseId
     * @param airport
     * @return
     */
    JsonResult createAirport(int enterpriseId, AirportDto airport);

    List<CityDto> searchCities(int enterpriseId, CommonSearchCriteria sc);

    JsonResult createCity(int enterpriseId, String username, CityDto dto);

    /**
     * 新建/更新航司信息
     *
     * @param dto
     * @return
     */
    JsonResult createAirlines(int enterpriseId, AirlinesDto dto);

    JsonResult saveLuggageInfo(int enterpriseId, LuggageInfoDto luggageInfo);

    List<LuggageInfoDto> searchLuggageInfos(int enterpriseId, CommonSearchCriteria sc);
    LuggageInfoDto searchLuggageInfo(int enterpriseId, int id);

    List<FlightCondTimeWindowDto> searchFlightConditionTimeWindows(String carrier);

    JsonResult saveFlightConditionTimeWindows(int userId, List<FlightCondTimeWindowDto> timeWindowDtos);

}
